package com.net.xpay.common.manager.impl;

import com.google.common.base.Preconditions;
import com.net.common.dao.BasicMapper;
import com.net.xpay.common.dao.CheckCodeLogMapper;
import com.net.xpay.common.domain.CheckCodeLog;
import com.net.xpay.common.manager.CheckCodeLogManager;
import com.net.common.manager.AbstractManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class CheckCodeLogManagerImpl extends AbstractManager<CheckCodeLog> implements CheckCodeLogManager{

    @Autowired
    private CheckCodeLogMapper mapper;


    @Override
    protected BasicMapper<Long, CheckCodeLog> getMapper() {
        return mapper;
    }

    @Override
    public CheckCodeLog findLastByCheckCodeId(Long checkCodeId) {
        Preconditions.checkArgument(checkCodeId != null);

        return mapper.findLastByCheckCodeId(checkCodeId);
    }
}
